<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ include file="../../../common/base.jsp"%>
<%
	response.setCharacterEncoding("utf-8");
	
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Insert title here</title>
<link href="${path }/dist/css/bootstrap.css" rel="stylesheet">
<link href="${path }/dist/css/bootstrap-overrides.css" rel="stylesheet">

<!-- Button -->
<link href="${path }/dist/css/compiled/elements.css" rel="stylesheet">
<!-- icon -->
<link rel="stylesheet" type="text/css"
	href="${path }/dist/css/font-awesome.css">
<!-- this -->
<link rel="stylesheet" type="text/css" href="${path }/dist/css/app.css">

<link href="${path }/dist/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet">
<%--时间日期工具 --%>
<link rel="stylesheet" type="text/css" href="${path }/back/ifrom.css">
<script src="${path }/dist/js/jquery.min.js"></script>
<script src="${path }/dist/js/bootstrap.min.js"></script>

<script src="${path }/dist/js/bootstrap-datetimepicker.min.js"></script>
<script src="${path }/dist/js/bootstrap-datetimepicker.zh-CN.js"></script>
<%-- <script src='${path }/dist/js/stickUp.js'></script>--%>

<style>
body{
	overflow: hidden;
}
#pad-wrapper {
	margin-top: 10px;
	margin-right: 0px;
	padding-right: 5px;
	margin-left: 0px;
	padding-left: 0px;
}
table tr>th{
	 text-align: center;
	 padding-bottom: 0px !important;
	 vertical-align: middle !important;
}
.tab-pane{
	padding-top: 10px;
}
</style>
</head>
<body>
<div id="pad-wrapper">
<div class="row">
<form action="${path }/back/assetsPD!report_dept_d_form" method="get">
			<div class="col-md-12 filter-block">
				<h2 class="text-center">部门<strong><span>${data_month }</span></strong>月资产折旧报表</h2>
				<div class="pull-right">
					<input type="text" class="search form_datetime" name="data_month" value="${data_month}" placeholder="选择月份">
					<button class="btn-flat success new-product" type="submit"><i class="icon-search"></i> <span>统计</span></button>
					<a class="btn-flat success new-product" href="${path }/downfile!downdeptd" onclick="downFile(this)"><i class="icon-cloud-download"></i> <span>导出报表xls</span></a>
					<%--disabled --%>
				</div><!-- 按钮组 -->
			</div>
			</form>
</div>
	<div class="tab-pane" id="dept_d_form">
		<table class="table table-bordered">

				<tr>
					<th class="col-md-1" rowspan="2" style="border: 1px;">部门名称</th>
					<th class="col-md-1" colspan="5">合计</th>
				</tr>
				<tr>
					<th class="col-md-1">资产数量</th>
					<th class="col-md-2">资产价值</th>
					<th class="col-md-2">月折旧额</th>
					<th class="col-md-2">累计折旧</th>
					<th class="col-md-2">账面净值</th>
				</tr>

			<tbody>
				<c:forEach	items="${formList }" var="l">
					<tr>
						<td>${l['dept_name'] }</td>
						<td>${l['amount'] }</td>
						<td><fmt:formatNumber value="${l['total_price'] }" pattern="#,#00.00#" /></td>
						<td><fmt:formatNumber value="${l['yzd'] }" pattern="#,#00.00#" /></td>
						<td><fmt:formatNumber value="${l['count_d'] }" pattern="#,#00.00#" /></td>
						<td><fmt:formatNumber value="${l['jz'] }" pattern="#,#00.00#" /></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</div>
	<script type="text/javascript">
	function downFile(obj){
		$(obj).attr('href',$(obj).attr('href')+"?data_month="+$("input[name='data_month']").val());
	}
		//时间日期
		$(".form_datetime").datetimepicker({
			format : 'yyyy-mm',
			language : 'zh-CN',
			weekStart : 1,
			todayBtn : 1,
			autoclose : 1,
			todayHighlight : 1,
			startView : 3,
			forceParse : 0,
			showMeridian : 1,
			minView : 3,
			pickerPosition : "bottom-left"
		});
		function onBodyDowndept(event) {
			if (!($(event.target).parents("#menuContent").length > 0)) {
				hidedepttree();
			}
		}

		
	</script>

</body>
</html>